package cn.easybuy.servlet.product;

import cn.easybuy.entity.Product;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

@WebServlet("/ChakanServlet")
public class ChakanServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        Product product=new Product();
//        String fileName = product.getFileName();
//        String name = product.getName();
//        float price = product.getPrice();
//        request.setAttribute("temp.fileName",fileName);
//        request.setAttribute("temp.name",name);
//        request.setAttribute("temp.price",price);
        HttpSession session=request.getSession();
        List<Product> ChakanburCarList = (List<Product>)session.getAttribute("burCarList");
        request.setAttribute("ChakanburCarList",ChakanburCarList);
        request.getRequestDispatcher("pre/settlement/settlement1.jsp").forward(request,response);
    }
}
